<?php

class EntryImageFormForBackend extends EntryImageForm {
	public function configure(){
		$this->useFields(array("name", "description", "entry_id"));

		$this->setWidget("entry_id", new sfWidgetFormInputHidden());

		$this->setWidget("path", new sfWidgetFormInputFile());
		$this->setValidator("path", new sfValidatorFile(array("required" => false, "path" => sfConfig::get("sf_image_upload_dir"))));
	}


	public function updateEntryIdColumn($value){
		if (empty($value)){
			return false;
		}else{
			return $value;
		}
	}


	/*
	public function generatePathFilename($file){
		return "image.jpg";
	}
	*/
}